# Stability and change in the opinion-policy relationship: Evidence from state minimum wage laws


`A-original-data` contains all original (raw) data. 

- `census_13-15-18-19.gz` is a compressed file containing `census_13-15-18-19.csv` with US Census microdata from the American Community Surveys https://doi.org/10.18128/D010.V11.0. 
- `cleaned_merged.rds` are survey data for 2014, 2016 and 2019
- `2021a.rds` is half of the 2021 survey data, `2021b.rds` is the other half of the 2021 survey data
- `policies.dta` describes state-level minimum wages 
- `state_data_dd.dta` contains data on ballot initiatives on minimum wage
- `Apartment_List_Rent_Estimates_State_2021_2.csv` and `Apartment_List_Rent_Data_-_State_2020-6.csv` are average rent prices for each state from https://www.apartmentlist.com/rentonomics/national-rent-data/. 
- `1976-2020-president.csv` are presidential election data via  https://doi.org/10.7910/DVN/42MVDX 
- `CCES16.RData`, `CCES18.RData`,`CCES19.RData`, and `CCES20.csv` are Cooperative (Congressional) Election Survey data via https://cces.gov.harvard.edu/ 

`B-analysis-data` contains processed data files.
- `survey_merged.rds` is our original survey data
- `census_13-19_raw.rds` is an interim stage of census data. 
- `census.rds` is final cleaned data on census
- `final_rentvote.rds` are rent and election data 
- `models.zip` contained the saved fitted `rstanarm` objects from MRP's stage 1. 
- `state_prefs.csv` is our exported predictions of state-level minimum wage preferences
- `national_pref.csv` is our estimation of national minimum-wage prefs. 
- `cces_estimates.csv` contains minimum wage preferences based on CCES data. 
- `presvote2012.rds` is election data from 2012


`C-code`
(Recommended order of execution as follows):
- `clean_rentvote.R` cleans rent data and election data and combines them. Exports `B-analysis-data/presvote2012.rds` and `B-analysis-data/final_rentvote.rds`. 
- `import_census.R` cleans census data. Exports `B-analysis-data/census_13-19_raw.rds` 
- `import.R` combines survey data with smoothers and tidies census data some more. Exports `B-analysis-data/survey_merged.rds` and `B-analysis-data/census.rds`. 
- `import_cces.R` cleans and merges CCES data with minimum wage prefs. Exports `B-analysis-data/cces_estimates.csv`
- `model.R` is our main analysis script fitting all our models, reproducing all results (including figures)

`D-documents`
- `/figures` contains all figures reported in the manuscript
- `/tables` contains regression tables in the manuscript

`E-metadata`
- `abbs.csv` contains abbreviations for US state names
- `CCES Guide 2016.pdf`, `CCES Guide 2018.pdf` and `CCES Guide 2020.pdf` contain the codebooks for CCESS data. 


```
>sessionInfo()

R version 4.2.0 (2022-04-22)  
Platform: x86_64-pc-linux-gnu (64-bit)  
Running under: Ubuntu 18.04.4 LTS` 

Matrix products: default  
BLAS:   /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3  
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C            
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8  
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8 
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C               
 [9] LC_ADDRESS=C               LC_TELEPHONE=C          
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C`

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.1   dplyr_1.0.9     tidyr_1.2.0     ggplot2_3.3.6  
 [5] plm_2.6-1       tidybayes_3.0.2 geofacet_0.2.0  here_1.0.1     
 [9] stargazer_5.2.3 bayesplot_1.9.0 rstanarm_2.21.3 Rcpp_1.0.8.3   
[13] ggridges_0.5.3  patchwork_1.1.1

loaded via a namespace (and not attached):
  [1] readxl_1.4.0         backports_1.4.1      miscTools_0.6-26    
  [4] plyr_1.8.7           igraph_1.3.1         sp_1.4-7            
  [7] splines_4.2.0        svUnit_1.0.6         crosstalk_1.2.0     
 [10] rstantools_2.2.0     inline_0.3.19        digest_0.6.29       
 [13] htmltools_0.5.2      fansi_1.0.3          magrittr_2.0.3      
 [16] checkmate_2.1.0      openxlsx_4.2.5       RcppParallel_5.1.5  
 [19] matrixStats_0.62.0   xts_0.12.1           sandwich_3.0-1      
 [22] bdsmatrix_1.3-4      prettyunits_1.1.1    jpeg_0.1-9          
 [25] colorspace_2.0-3     ggrepel_0.9.1        ggdist_3.1.1        
 [28] xfun_0.30            haven_2.5.0          rbibutils_2.2.8     
 [31] callr_3.7.0          crayon_1.5.1         lme4_1.1-29         
 [34] survival_3.3-1       zoo_1.8-10           glue_1.6.2          
 [37] gtable_0.3.0         distributional_0.3.0 pkgbuild_1.3.1      
 [40] rstan_2.21.5         maxLik_1.5-2         imguR_1.0.3         
 [43] abind_1.4-5          scales_1.2.0         DBI_1.1.2           
 [46] miniUI_0.1.1.1       lfe_2.8-8            xtable_1.8-4        
 [49] HDInterval_0.2.2     units_0.8-0          ggstance_0.3.5      
 [52] foreign_0.8-82       proxy_0.4-26         Formula_1.2-4       
 [55] stats4_4.2.0         StanHeaders_2.21.0-7 DT_0.22             
 [58] collapse_1.7.6       htmlwidgets_1.5.4    geogrid_0.1.1       
 [61] httr_1.4.3           threejs_0.3.3        arrayhelpers_1.1-0  
 [64] posterior_1.2.1      ellipsis_0.3.2       pkgconfig_2.0.3     
 [67] loo_2.5.1            farver_2.1.0         utf8_1.2.2          
 [70] tidyselect_1.1.2     rlang_1.0.2          reshape2_1.4.4      
 [73] later_1.3.0          cellranger_1.1.0     munsell_0.5.0       
 [76] tools_4.2.0          cli_3.3.0            generics_0.1.2      
 [79] evaluate_0.15        stringr_1.4.0        fastmap_1.1.0       
 [82] arm_1.12-2           knitr_1.39           processx_3.5.3      
 [85] zip_2.2.0            purrr_0.3.4          nlme_3.1-157        
 [88] mime_0.12            rstudioapi_0.13      compiler_4.2.0      
 [91] shinythemes_1.2.0    curl_4.3.2           png_0.1-7           
 [94] e1071_1.7-9          tibble_3.1.7         stringi_1.7.6       
 [97] highr_0.9            ps_1.7.0             rgeos_0.5-9         
[100] lattice_0.20-45      Matrix_1.4-1         classInt_0.4-3      
[103] nloptr_2.0.1         markdown_1.1         shinyjs_2.1.0       
[106] tensorA_0.36.2       vctrs_0.4.1          pillar_1.7.0        
[109] lifecycle_1.0.1      Rdpack_2.3           lmtest_0.9-40       
[112] data.table_1.14.2    httpuv_1.6.5         R6_2.5.1            
[115] promises_1.2.0.1     rio_0.5.29           KernSmooth_2.23-20  
[118] gridExtra_2.3        codetools_0.2-18     boot_1.3-28         
[121] colourpicker_1.1.1   MASS_7.3-56          gtools_3.9.2        
[124] assertthat_0.2.1     rprojroot_2.0.3      withr_2.5.0         
[127] rnaturalearth_0.1.0  shinystan_2.6.0      hms_1.1.1           
[130] parallel_4.2.0       grid_4.2.0           coda_0.19-4         
[133] class_7.3-20         minqa_1.2.4          rmarkdown_2.14      
[136] sf_1.0-7             shiny_1.7.1          base64enc_0.1-3     
[139] dygraphs_1.1.1.6    
```